﻿using FreeSql.DataAnnotations;

namespace KrasDD.Models
{

    [JsonObject(MemberSerialization.OptIn), Table(Name = "[innovator].[ITEMTYPE]", DisableSyncStructure = false)]
    public partial class ITEMTYPE : AppBaseEntity
    {

        [JsonProperty, Column(DbType = "bit")]
        public bool ALLOW_PRIVATE_PERMISSION { get; set; } = true;

        [JsonProperty, Column(DbType = "bit")]
        public bool AUTO_SEARCH { get; set; }

        [JsonProperty, Column(StringLength = -2)]
        public string CACHE_QUERY { get; set; }

        [JsonProperty, Column(StringLength = -2)]
        public string CLASS_STRUCTURE { get; set; }

        [JsonProperty, Column(StringLength = 128)]
        public string CLOSE_ICON { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool CORE { get; set; }

        [JsonProperty, Column(StringLength = -2)]
        public string DESCRIPTION { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool ENFORCE_DISCOVERY { get; set; } = true;

        [JsonProperty]
        public int? DEFAULT_PAGE_SIZE { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string HELP_ITEM { get; set; }

        [JsonProperty, Column(StringLength = 80)]
        public string HELP_URL { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool HIDE_WHERE_USED { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string HISTORY_TEMPLATE { get; set; }

        [JsonProperty, Column(StringLength = -2)]
        public string IMPLEMENTATION_DDL { get; set; }

        [JsonProperty, Column(StringLength = 64)]
        public string IMPLEMENTATION_TYPE { get; set; } = "table";

        [JsonProperty, Column(StringLength = 30)]
        public string INSTANCE_DATA { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool IS_DEPENDENT { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool IS_RELATIONSHIP { get; set; } = false;

        [JsonProperty, Column(StringLength = 64)]
        public string LABEL { get; set; }

        [JsonProperty, Column(StringLength = 64)]
        public string LABEL_PLURAL { get; set; }

        [JsonProperty, Column(StringLength = 128)]
        public string LARGE_ICON { get; set; }

        [JsonProperty, Column(StringLength = 64)]
        public string MANUAL_VERSIONING { get; set; }

        [JsonProperty]
        public int? MAXRECORDS { get; set; }

        [JsonProperty, Column(StringLength = 30, IsNullable = false)]
        public string NAME { get; set; }

        [JsonProperty, Column(StringLength = 128)]
        public string OPEN_ICON { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string REVISIONS { get; set; } = "7FE395DD8B9F4E1090756A34B733D75E";

        [JsonProperty, Column(StringLength = 64)]
        public string SHOW_PARAMETERS_TAB { get; set; } = "1";

        [JsonProperty, Column(StringLength = 64, IsNullable = false)]
        public string STRUCTURE_VIEW { get; set; } = "tabs off";

        [JsonProperty, Column(DbType = "bit")]
        public bool UNLOCK_ON_LOGOUT { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool USE_SRC_ACCESS { get; set; }


        #region 外键 => 导航属性，OneToMany


        [Navigate("SOURCE_ID")]
        public virtual List<PROPERTY> PROPERTIES { get; set; }



        #endregion
    }

}
